﻿<UserControl x:Class="CustomControls.PictureControl.PictureControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:MenuDiskControl="clr-namespace:CustomControls.MenuDiskControl" Width="400" Height="Auto">
    <UserControl.Resources>
        <Storyboard x:Key="ClosePictureStoryBoard">
            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineThicknessKeyFrame KeyTime="00:00:01.1000000" Value="-500,-200,500,200"/>
            </ThicknessAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="270"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:01.1000000" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0.2"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0.2"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <TransformGroup>
                <ScaleTransform/>
                <SkewTransform/>
                <RotateTransform/>
                <TranslateTransform/>
            </TransformGroup>
        </Grid.RenderTransform>
        <StackPanel>
            <Border Name="OuterFrame" CornerRadius="5">
                <Border.Background>
                    <LinearGradientBrush Opacity="0.8">
                        <GradientStop Color="Silver" Offset="0.0"/>
                        <GradientStop Color="AntiqueWhite" Offset="1.0"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Border Name="InnerFrame" Background="White" BorderBrush="Black" 
                Margin="6,6,6,6">
                    <Rectangle Name="rectangle1" Margin="1, 1, 1, 1" MinWidth="100" MinHeight="100"  Width="Auto" Height="Auto" Fill="Transparent" />
                </Border>
            </Border>
        </StackPanel>
        <MenuDiskControl:MenuDiskControl x:Name="CommandDisk" Width="55" Height="55" HorizontalAlignment="Right" Margin="-27.5" VerticalAlignment="Top"/>
    </Grid>
</UserControl>

